<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 
     绝对定位:
     子绝父相
    */
    .father {
      width: 400px;
      height: 300px;
      background-color: red;
      margin: 100px;
      /* 相对定位 */
      position: relative;
    }

    .son1 {
      width: 100px;
      height: 100px;
      background-color: green;
      /* 绝对定位 */
      position: absolute;
      left: 50px;
      top: 50px;
    }

    .son2 {
      width: 100px;
      height: 100px;
      background-color: pink;
      /* 绝对定位 */
      position: absolute;
      left: 60px;
      top: 70px;

      z-index: 999;
    }

    .son3 {
      width: 100px;
      height: 100px;
      background-color: skyblue;
      /* 绝对定位 */
      position: absolute;
      left: 80px;
      top: 90px;
    }
  </style>
</head>

<body>
  <div class="father">
    <div>2112123121</div>
    <div>2112123121</div>
    <div>2112123121</div>
    <div>2112123121</div>
    <div class="son1"></div>
    <div class="son2"></div>
    <div class="son3"></div>
  </div>
</body>

</html>